<?php
$str=$_POST['datastring'];
parse_str($str);

//param in str
//Message fullName Phone Email2 

//$to = 'infaario2gmail.com';
$to = 'development6600@gmail.com';

$subject = 'From Maxcash Contact Us ';

$headers = "From: " . $Email2 . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

$message = '<html><body>';
$message .= '<table style="border:1px solid #666;" cellpadding="5">';
$message .= "<tr><td><strong>Name</strong> </td><td>" . $fullName . "</td></tr>";
$message .= "<tr><td><strong>Phone</strong> </td><td>" . $Phone . "</td></tr>";
$message .= "<tr><td><strong>Email</strong> </td><td>" . $Email2 . "</td></tr>";
$message .= "<tr><td><strong>Message</strong> </td><td>" . $Message . "</td></tr>";
$message .= "</table>";
$message .= '</body></html>';

if(mail($to, $subject, $message, $headers)){
	echo ('Your form is submitted successfully.');
	  echo '<script type="text/javascript">';
      echo 'alert("Your form is submitted successfully.")';
      echo '</script>';
}
else
	echo ('Failed to submit your form.');
?>